Skip to content

Sync csa branch with main#234

Closed
Mathieu Kardous (mkardous-silabs) wants to merge 48 commits intomainfrom
automation/update_main
Closed

Sync csa branch with main#234
Mathieu Kardous (mkardous-silabs) wants to merge 48 commits intomainfrom
automation/update_main

Conversation

@mkardous-silabs
Copy link
Contributor

This PR syncs the csa branch with the main branch.

* Clean up Wifi Interface headers

* Rename SiWx function

* fix comment

* fix build

* Address review comments
…ram savings, simpler interface (#37033)

* Copied over the new AttributePathExpandIterator and will incrementally use it (so I can validate tests)

* Rename AttributePathExpandIterator to legacy

* Prepare for using new style iterators ... checking NOT YET enabled though

* Enabled checks ... and unit tests fail, but this now can be debugged

* Fix some of the underlying bugs: read handling logic assumes we are ok to undo

* Unit tests pass now

* Restyle

* Use new iterator in IME

* Update logic to use the new iterator on testRead

* more updates

* Restyle

* Remove the legacy attribute path expand iterator

* Update naming

* Restyle

* Remove extra argument for ReadHandler constructor

* Restyle

* Slight flash improvement

* Fix up includes

* Removed empty line

* added comment on why state is a friend class

* Comment updates

* Restyle, add some comments and add extra checks on validity check only for expansion. This saves a tiny amount of flash (32 bytes)

* Remove an include

* Comment updates, renamed mLastOutputPath to mOutputPath

* Fix one typo

* Re-arrange members of ReadHandler to optimize for memory layout. This saves 8 bytes for struct. We still have a 20-byte padding which I am unsure how to get rid of

* Restyle

* Rename State to Position

* One more rename

* Remove redundant assigment ...we are at a net 0 txt increase now on qpg

* Add more unit tests for non-obvious requirement that wildcard expansion checks path validity, however non-wildcard does not check it

* Update src/app/AttributePathExpandIterator.cpp

Co-authored-by: Tennessee Carmel-Veilleux <tennessee.carmelveilleux@gmail.com>

* Update src/app/AttributePathExpandIterator.h

Co-authored-by: Tennessee Carmel-Veilleux <tennessee.carmelveilleux@gmail.com>

* Update src/app/AttributePathExpandIterator.h

Co-authored-by: Tennessee Carmel-Veilleux <tennessee.carmelveilleux@gmail.com>

* Update src/app/AttributePathExpandIterator.h

Co-authored-by: Tennessee Carmel-Veilleux <tennessee.carmelveilleux@gmail.com>

* Update src/app/ReadHandler.h

Co-authored-by: Tennessee Carmel-Veilleux <tennessee.carmelveilleux@gmail.com>

* Update src/app/ReadHandler.cpp

Co-authored-by: Tennessee Carmel-Veilleux <tennessee.carmelveilleux@gmail.com>

* Update src/app/AttributePathExpandIterator.h

Co-authored-by: Tennessee Carmel-Veilleux <tennessee.carmelveilleux@gmail.com>

* Use different values for the cluster ids for testing

* One more state to position change

* mExpanded is now set during output path returning. Removed 2 more sets to save another tinier amount of .text

* Import metadatalist class and test

* Remove some tests that seem redundant, keep only one

* Start with generated commands, see if we can replace its usage...

* Unit tests for GeneratedCommands pass

* Start with an implementation of accepted commands (no testing yet)

* More tests pass

* Updated AcceptedCommands as well .. unit tests pass

* Restyle

* Fix namespaces

* Slight refactor. Code is still very much ugly

* A bit of refactor, code looks better and tests pass now

* Code compile for semantic tag ... made std::optional support non-trivial destructors

* Update test

* Make chip::Optional be trivially destructible if the underlying type is.

Previous implementation always had a destructor, so it was never
trivially destructible.

* Update src/app/AttributePathExpandIterator.cpp

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* Update src/app/AttributePathExpandIterator.cpp

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* Update src/app/AttributePathExpandIterator.cpp

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* Update src/app/AttributePathExpandIterator.cpp

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* Update src/app/InteractionModelEngine.cpp

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* Update src/app/ReadHandler.h

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* Update src/app/AttributePathExpandIterator.h

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* Update src/app/ReadHandler.h

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* Use mCompletePosition

* Another rename

* Undo submodule update

* Restyle

* Remove extra char

* Remove unused variable

* Update comment text to not sound like graph parsing

* Rename method to be more descriptive

* Remove one more unused variable

* Update peek attribute iterator to rollback and update code logic a bit. Hoping for cleaner code

* Semantic tags conversion is done

* Restyle

* Migrate device types to the new format

* update comment a bit

* Add unused marker for chip errors used for logging only

* Fix descriptor cluster

* Fix microwave oven

* Restyle

* Fix intentional bugprone-use-after-move

* Fix intentional bugprone-use-after-move

* Restyle

* Fix based on clang feedback

* Move endpoints to the new style of iteration

* Fix includes

* Fix includes

* Fix includes

* make it standard that test Providers are for now CodegenDataModelProvider. Saves me some typing as I move things around

* Restyle

* Minor update in logic: do the endpoint selection when next is called

* Allow startup to try to mark attributes dirty even if no provider exists yet

* Fix typo

* start implementing client clusters

* Update ClientCluster logic

* Restyle

* Start defining the server cluster query

* Actually use the new server cluster functionality

* Fix an include

* More include fixes

* implement the get attributes and adapt unit tests

* Restyle

* more updates to cleanup code. I am a bit concerned about O(n^2) attribute access...

* A rename and moved finder methods out of inline. Saves 650 bytes of flash

* Update logic to centralize metadata list code with less templating

* move the generic metadata list to detail, add an assert on trivial destruction

* Fix namespace prefix

* Save 70 bytes by using references in condensed for loops

* Replace count-if because it seems to result in smaller code (46 bytes)

* Another find_if replacement

* Replaced some find_if...we are down to 92 bytes on qpg

* Replaced one more find-if, saving another 88 bytes of flash

* Removed algorithm includes: these are slow and would like compile to fail if used

* Save more flash ... we should be at a net negative now

* This seems to save even more

* More savings by more encode overrides ... this is silly...

* Fix typos

* More explicit casting, removed 64-bit overrides

* Added one more check for freeing memory .Still need to track a leak that darwin finds

* Fix memory leak in assignment

* Self-review: fix includes

* Self-review: fix includes

* Self-review: fix includes

* Self-review: fix includes

* Update src/data-model-providers/codegen/CodegenDataModelProvider.cpp

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* Update src/data-model-providers/codegen/CodegenDataModelProvider.cpp

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* Update src/app/AttributePathExpandIterator.h

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* Update src/app/AttributePathExpandIterator.h

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* Update src/app/clusters/descriptor/descriptor.cpp

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* Update src/app/clusters/descriptor/descriptor.cpp

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* Update src/app/data-model-provider/MetadataList.cpp

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* Fix spelling for acquire

* Update src/app/data-model-provider/MetadataList.h

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* Update src/app/data-model-provider/MetadataList.h

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* Update src/app/data-model-provider/MetadataList.h

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* Fix is_trivially_destructible

* Update src/app/data-model-provider/MetadataSearch.h

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* More fixes

* Fix includes

* Fix invalid check typo

* Fix comment

* Correct comment

* Updated comment

* Make logic between clusters/attributes/endpoints the same regarding nullopt and wildcards

* Restyle

* Update logic for IsDescentantof

* Help compiler generate efficient code as we keep reusing the same pointer

* clearer logic that we handle all cases

* Fixes

* Use calloc

* Update comment

* Fix include

* Fix casting

* Make cluster count functions from ember public API since they seem reusable

* Also fix dynamic dispatch

* update enumeration entry

* another comment update

* Undo submodule update

* Rename metadata search to metadta lookup

* Update metadata list methods to be all uppercase

* Fix more renames

* Fix invalid cast

* Update src/data-model-providers/codegen/CodegenDataModelProvider.cpp

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* Update src/data-model-providers/codegen/CodegenDataModelProvider.cpp

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* Update src/data-model-providers/codegen/CodegenDataModelProvider.cpp

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* Update src/app/data-model-provider/MetadataList.h

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* Address comments

* fix bug

* Update src/app/AttributePathExpandIterator.cpp

Co-authored-by: Mathieu Kardous <84793247+mkardous-silabs@users.noreply.github.com>

* Update src/app/WriteHandler.cpp

Co-authored-by: Mathieu Kardous <84793247+mkardous-silabs@users.noreply.github.com>

* Update src/app/AttributePathExpandIterator.cpp

Co-authored-by: Mathieu Kardous <84793247+mkardous-silabs@users.noreply.github.com>

* Restyle and include update

---------

Co-authored-by: Andrei Litvin <andreilitvin@google.com>
Co-authored-by: Tennessee Carmel-Veilleux <tennessee.carmelveilleux@gmail.com>
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
Co-authored-by: Mathieu Kardous <84793247+mkardous-silabs@users.noreply.github.com>
* Add support for ExtraReadPaths to CommissioningParameters

* CHIP_CONFIG_ENABLE_READ_CLIENT strikes again

* Check for alloc failure

* Address further review comments
* Remove cluster objects dependency from platform

* Add a dependency that was transient before

* More updates, get up to qpg to compile

* Restyle

* Add app_config dependency to all ThreadStackManagerImpl.cpp

* Fix one more compile error

* Make ConnectivityManagerImpl.cpp depend on app_config

* One more dependency for InteractionModelEngine.h

* Fix AccessRestrictionProvider dependencies

* Workaround for ESP32 layering error
…ng (#37102)

* Improve error logging for WiFi data transmission failures in low_level_output

* Adds SLAAC IPv6 print

* Revert line for define check

* Adds missing includes

* Update status initialization

* Revert "Update status initialization"

This reverts commit f8f8377da765c772570e9031a62af919c46cfbba.

* Adds change based on comments

* Fix compilation

---------

Co-authored-by: Rohan S <3526930+brosahay@users.noreply.github.com>
* Update Dockerfile for updating java version

* Update version file
… (#37083)

* - add matter_asserts.py module with common asserts for int, string, list
- add docstrings

* add examples for more complex assertions

* use assert_greater_equal and assert_less_equal for numeric range checks

* add matter_asserts.py to BUILD.gn

* rename some methods to better reflect their intention

* add assert_int_in_range assertion

* add unit tests for matter_asserts module
* Helper script to diff spec revisions

This isn't used anywhere yet, just for generating summaries for
manual checking. But I'd like it on the record somewhere because
it generates helpful PR descriptions for updates.

* Restyled by isort

---------

Co-authored-by: Restyled.io <commits@restyled.io>
As documented in the TODO, the callback requires the caller to pass a
NULL-terminated C-string, but it’s actually a length-buffer pair.
The python lighting example receives values with incorrect length due to this
issue.

This PR fixes the FFI interface by wrapping the callback function, and converts
the length-buffer pair to a proper python bytes value.
…on. (#36893)

* Updating unit test runner script for EFR32 and associated documentation.

* Restyled by prettier-markdown

* Restyled by prettier-markdown

* Readme updates

* Readme updates

* Updated README and tasks.json

* Restyled

---------

Co-authored-by: Restyled.io <commits@restyled.io>
Bump default output dir to v1.4 Branch
…#36989)

The current code is adding a new controller to the fids array which has the effect that the next loop will try to also read from this controller, but the test expects commissioning to fail, so this will not work.

The test currently does not fail because of another problem which is not addressed 8yet) by this PR and is in discussion. To see the effect of this change the used controller need to have more fabrics allowed then the used chip-app - currently because both have same limit of 17 this is failing already on controller instance creation which never added the controller to the fids array.
* ESP32: remove the nogncheck in platform source

* remove the workaround changes in ESP32 platform
* Add example conformance report tool

* Integrate report into app engine

* Restyled by isort

* fix lint errors

* Add more targets

* Restyled by isort

* Add python build to startup script

* Update readme for the compute_engine VM

* fix spelling

* spelling

* Restyled by prettier-markdown

* limit ninja_jobs to cpu_count() - 2

* Fix typo; group cmds in the script

* Improved comments on find_executables(dirs)

---------

Co-authored-by: Restyled.io <commits@restyled.io>
…(#37137)

* Changed needed for NFC Commissioning:
Added libpcsclite-dev which is needed to build linux platforms.
This package contains the files needed for compiling and linking an
application that communicates with an available PC/SC reader.

* Changed version file.
* Decouple ember functions from general diagnostic cluster

* Address review comment
…958)

* Added a public API to RefreshKeySender to retrieve ICDClientInfo

* Added a public API to RefreshKeySender to retrieve ICDClientInfo

* Restyled by clang-format

* Restyled by clang-format

---------

Co-authored-by: Restyled.io <commits@restyled.io>
* Update 1.4 DM XMLs to latest

* Fix CI checker so it properly checks spec_sha
Previously, all test cases in a single test run were using the same
random port, and it caused some flakiness because sometimes the kernel
could still be holding on to the previous test case port and, as a
result, the next test case failed to bind throwing an "Address Already
In Use" error.
…ld option (#37157)

The components required in order to support LittleFS based key storage
in Matter applications are no longer available in NXP SDK 3.0.
Moreover, since the migration to the (Zephyr) NVS based key storage is
complete, LittleFS based key storage can now be removed from the build
options.

Signed-off-by: Marian Chereji <marian.chereji@nxp.com>
* Update DM XML generation script to use new path format

* Restyled by isort

* Remove unused import

---------

Co-authored-by: Restyled.io <commits@restyled.io>
* [openthread][mcxw71] Add ot-nxp platform file as include directory

Signed-off-by: marius-alex-tache <marius.tache@nxp.com>

* [platform][mcxw71] Remove unused openthread dep in mbedtls config file

Signed-off-by: marius-alex-tache <marius.tache@nxp.com>

* [platform][common] Add ota.gni to be reused by platform layer

List some OTA files in an organized manner to avoid duplication in other
gn files.

Signed-off-by: marius-alex-tache <marius.tache@nxp.com>

* [platform][mcxw71] Use ota.gni

Signed-off-by: marius-alex-tache <marius.tache@nxp.com>

* Restyled by clang-format

* Restyled by gn

---------

Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
Co-authored-by: Restyled.io <commits@restyled.io>
* Re-validate submodules when labels are modified

* Reformat help text
Minor modification in the command description to account for the removal
of an argument in the Spec.
…… (#37104)

* da_revocation: fix serial number formatting in revocation set generation script

Also update test data to ensure 2-byte alignment

* add comment explaining the change

* update comment
* Pin the Restyler version to v0.6.0.2

* Remove new name tags
* ESP32: Remove the same configs as defaults

* resolve comments
Takes mypy errors down from 79 to 27. Nearly all remaining are
related to Enum - mypy has support for Enum functions, but it seems
like the derived classes are messing it up. Can be addressed
in a followup - this is still better.

The goal here is mostly to tighten up the type annotations and
move int -> uint for ids where possible, such that the spec
parsing is providing data with a stronger guarantee.

Testing: Tested by TestSpecParsing.py and TestSpecParsingDeviceTypes.py
         Also used by tests run in CI (including above)
* Avoid PW-RPC assertion error if application is stopped without any RPC connections

* Anoter PWRPC crash fix

* Implement the write from TLV

* Update protos to support string and bytes as separate types for encode/decode

* Restyle

* make writes actually work

* Make write(read.tlv) actually work

* Fix typo
* Added fix for ncp init issue

* Removed commented code

* Removed unused variables

* Resolved review comments

* Reverted sl_board_configuration.h header include

* Resolved review comments

* Added latest sdk_support pointer and resolved review comments

* Added comment for SPI transfer API

* Disabled lcd and external flash in silabs_boards.gni for 917 NCP board

* Added TODO for removing disabling lcd and enable external flash

* TODO added properly in silabs_board.gni file

---------

Co-authored-by: Andrei Litvin <andy314@gmail.com>
…th a size_t pathsConfig.count (#37173)

in reality pathsConfig.count will never exceed 255 but since this is TestCode simplest is to make the loop condition index a size_t
…ath, ListBuilder &)` (#37127)

* Append-only API update: use CHIP_ERROR and builders for MetadataTree

* Fix includes

* Remove odd comment

* ScopedSpan == ReadOnlyBuffer and Build == TakeBuffer

* Update src/app/InteractionModelEngine.cpp

Co-authored-by: Tennessee Carmel-Veilleux <tennessee.carmelveilleux@gmail.com>

* Update src/app/clusters/descriptor/descriptor.cpp

Co-authored-by: Tennessee Carmel-Veilleux <tennessee.carmelveilleux@gmail.com>

* Update src/app/clusters/descriptor/descriptor.cpp

Co-authored-by: Tennessee Carmel-Veilleux <tennessee.carmelveilleux@gmail.com>

* Update src/app/clusters/descriptor/descriptor.cpp

Co-authored-by: Tennessee Carmel-Veilleux <tennessee.carmelveilleux@gmail.com>

* Update src/app/clusters/descriptor/descriptor.cpp

Co-authored-by: Tennessee Carmel-Veilleux <tennessee.carmelveilleux@gmail.com>

* Update src/app/clusters/descriptor/descriptor.cpp

Co-authored-by: Tennessee Carmel-Veilleux <tennessee.carmelveilleux@gmail.com>

* Update src/app/data-model-provider/MetadataList.cpp

Co-authored-by: Tennessee Carmel-Veilleux <tennessee.carmelveilleux@gmail.com>

* Replaced a lot of auto with const auto for readability

* Update src/app/clusters/microwave-oven-control-server/microwave-oven-control-server.cpp

Co-authored-by: Tennessee Carmel-Veilleux <tennessee.carmelveilleux@gmail.com>

* Remove old comment

* Fix some typos

* Fix typo

* Update src/app/data-model-provider/MetadataTypes.h

Co-authored-by: Junior Martinez <67972863+jmartinez-silabs@users.noreply.github.com>

---------

Co-authored-by: Tennessee Carmel-Veilleux <tennessee.carmelveilleux@gmail.com>
Co-authored-by: Junior Martinez <67972863+jmartinez-silabs@users.noreply.github.com>
Co-authored-by: Andrei Litvin <andreilitvin@google.com>
* [SL-UP] Add provisioning root argument (#231)

* Restyled by gn

---------

Co-authored-by: Restyled.io <commits@restyled.io>
…37165)

This affects how NSUInteger is bridged into Swift when building locally.
… invoke timeout. (#37179)

We should log what happened to the work item, not just silently complete it.
* Darwin: Tidy up some device type meta-data classes

- Move MTRDeviceTypeRevision out of ServerEndpoint directory
- Move MTRProductIdentity into its own file
- Implement NSCopying and equality on MTRDeviceType and MTRProductIdentity
- Implement description on all 3 types
- Add tests

* Darwin: Add MTRCommissioningParameters.readEndpointInformation

Endpoint information is made availalable to the delegate via an
MTRCommissioneeInfo object containing MTREndpointInfo objects.

* Apply suggestions from code review

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

* Use NSString literal for MTRDeviceTypeData

* Process endpoints in best-effort fashion even with invalid / missing DeviceTypeList

Also add some additional comments to parsing logic and a couple more tests.

* Address further review comments for Darwin layer

* Move MTRCommissioneeInfo into its own set of files

* Make MTRCommissioneeInfo and related types conform to NSSecureCoding

Also conform to NSCopying, mark as sendable, and implement isEqual/hash.

* Fix terminology a bit.

---------

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
* da_revocation: added dac_provider test vectors

These test vectors support testing with sample revocation sets.

* dac_revocation: device attestation revocation user guide

This document lists the process for testing device attestation revocation using the dac provider test vectors sample revocation sets.

* Restyled by whitespace

* Restyled by prettier-markdown

* Match the enum string with correct value in the doc

---------

Co-authored-by: Restyled.io <commits@restyled.io>
* Move MockTestRunner to chip testing package

* Fix script dir path

* Remove unused import
Fix broken link to test scripts
@mkardous-silabs Mathieu Kardous (mkardous-silabs) deleted the automation/update_main branch January 24, 2025 17:22
@github-actions github-actions bot restored the automation/update_main branch January 24, 2025 17:27
@mkardous-silabs Mathieu Kardous (mkardous-silabs) deleted the automation/update_main branch January 24, 2025 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.